package com.jihu.design.behavioral.visitor;

/**
 * @author jihu
 * @date 2021/10/12
 */
public class CPU extends  HardWare {

    public CPU(String command){
        super(command);
    }

    @Override
    public void work() {
        System.out.println("cpu处理指令:"+command);
    }

    @Override
    public void accept(Vistor vistor) {
        //给升级包提供一个改cpu指令等的
        vistor.visitCPU(this);
    }
}
